package com.example.phone.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class SeekActivity extends Activity {
	private Button seekKeyWorkBut;
	private EditText seekKeyWorkTxt;
	private Button seekAdvanceeBut;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.seek_activity);
		seekKeyWorkTxt = (EditText) findViewById(R.id.seekKeyWorkTxt);
		seekKeyWorkBut = (Button) findViewById(R.id.seekKeyWorkBut);
		seekAdvanceeBut = (Button) findViewById(R.id.seekAdvancedBut);
		seekKeyWorkBut.setOnClickListener(listener);
		seekAdvanceeBut.setOnClickListener(listener);
	}

	private OnClickListener listener = new OnClickListener() {

		@Override
		public void onClick(View v) {
			if (v.getId() == R.id.seekKeyWorkBut) {
				String keyWorkString = seekKeyWorkTxt.getText().toString();
				Intent intent = new Intent(SeekActivity.this,
						ListBusActivity.class);
				startActivity(intent);
			}
			if (v.getId() == R.id.seekAdvancedBut) {
				Intent intent = new Intent(SeekActivity.this,
						SeekAdvancedActivity.class);
				startActivity(intent);
			}
		}
	};
}
